home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_04
/
9n04121a
< prev
next >
Wrap
Text File
|
1991-02-16
|
485b
|
19 lines
mmult(aray1,aray2,aray3,row1,col1,row2,col2)
register float *aray1, *aray2, *aray3;
int row1, col1, row2, col2;
{
register short k, kmax, j, i;
kmax = (col1<row2) ? col1 : row2;
for (i=0;i<row1;++i)
for (j=0;j<col2;++j)
{
aray3[i*col1+j] = 0;
for (k=0;k<kmax;++k)
aray3[i*col1+j] += aray1[i*col1+k] *
aray2[k*col2+j];
}
return;
}